<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<div class="content">
	<div class="box">
		<div class="box-header">
			<form class="form-inline" method="post" id="contextForm">
				<label>借款名:</label>
				<input type="text" class="form-control">
				<input type="hidden" value="" name="page">
				<button type="submit" class="btn btn-primary">查询</button>
			</form>
		</div>
		<div class="box-body">
		<table class="table" data-toggle="dataTable">
			<thead>
				<tr>
					<th>编号</th>
					<th>标名</th>
					<th>利息</th>
					<th>期限</th>
					<th>金额</th>
					<th>状态</th>
					<th>还款方式</th>
					<th>日期</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<c:forEach items="${borrowInfos.iterator()}" var="obj">
					<tr>
						<td>${obj.id }</td>
						<td>${obj.name }</td>
						<td>${obj.investRate }</td>
						<td>${obj.period }</td>
						<td>${obj.totalMoney }</td>
						<td>${obj.status }</td>
						<td>${obj.repaymentMethod }</td>
						<td>${obj.createTime }</td>
						<td>
							<a href="javascript:void(0);" data-toggle="dialog" data-url="<c:url value="/manager/borrow/audit/${obj.id }"/>" class="btn btn-primmary">审核</a>
							<c:if test="${obj.status eq 'TRIAL' }">
							<a href="<c:url value="/manager/borrow/delete/${obj.id }"/>" data-toggle="doAjax" data-msg="您确认要删除吗？">删除</a>		
							</c:if>
						</td>
					</tr>
				</c:forEach>
			</tbody>
		</table>
		<c:import url="/WEB-INF/commons/Page.jsp">
           <c:param name="totalElements" value="${borrowInfos.totalElements}"/>
           <c:param name="total" value="${borrowInfos.totalPages}"/>
           <c:param name="isLast" value="${borrowInfos.last}"/>
           <c:param name="number" value="${borrowInfos.number}"/>
       </c:import>
		</div>
	</div>
</div>
<script type="text/javascript">
	$(document).ready(function(){
		$("a[data-toggle='dialog']").click(function(){

		});
	});
</script>